<script setup>
const modules = import.meta.glob('@/assets/images/wrapper*')
const imgs = Reflect.ownKeys(modules)
</script>

<template>
  <section class="p-5">
    <el-alert
      title="Vite Plugin - 图片预加载"
      type="success"
      description="利用 link 的 rel=preload 资源提示符，提前加载大图片，减少白屏时间"
      show-icon
      class="mb-5"
    />
    <div class="wrapper">
      <template v-for="(url, i) in imgs" :key="i">
        <img :src="url" :alt="i" :title="i" class="w-[100%]" />
      </template>
    </div>
  </section>
</template>

<style scoped>
.wrapper {
  column-count: 3;
  column-gap: 10px;
}
</style>
